package com.push.graph.service.impl;


import com.push.graph.dao.CourseScheduleRepository;
import com.push.graph.pojo.CourseSchedule;
import com.push.graph.service.CourseScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseScheduleServiceImpl implements CourseScheduleService {

    @Autowired
    private CourseScheduleRepository courseScheduleRepository;


    @Override
    public CourseSchedule add(CourseSchedule courseSchedule) {
        CourseSchedule schedule = courseScheduleRepository.save(courseSchedule);
        return schedule;
    }

    @Override
    public List<CourseSchedule> findByClassGrade(String classGrade) {
        return courseScheduleRepository.findByClassGrade(classGrade);
    }
}
